{% extends "_layout.html" %}
{% import "component/pagination.njk" as pagination %}
{% import "component/table.njk" as table %}
{% import "component/search.njk" as search %}
{% import "component/constant.njk" as constant %}

{# 样式代码 #}
{% block style %}

{% endblock %}

{# bodyd代码#}
{% block body %}
<div class="wrapper wrapper-content">
<div class="row">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">

            <div class="ibox-content">
                <div class="row">
                    <div class="col-sm-12">
                        <form class="page-search-form">
                            {{ search.text('订单号', 'orderNo', params.orderNo) }}
                            {{ search.select('状态', 'status', [{
                                id: '1',
                                name: '待支付'
                            },{
                                id: '2',
                                name: '已支付'
                            },{
                                id: '3',
                                name: '配送中'
                            },{
                                id: '4',
                                name: '已收货'
                            },{
                                id: '5',
                                name: '退款'
                            }], params.status) }}
                            {{ search.text('名称', 'orderName', params.orderName, true) }}
                        </form>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="table-responsive">
                   <form id="table-form">
                   		<table class="table table-striped">
                           <thead>
                           <tr>
                               	<th></th>
								<th>订单号</th>
								<th>订单名称</th>
								<th>姓名</th>
								<th>手机号</th>
								<th>订单状态</th>
								<th>订单金额</th>
								<th>订单来源</th>
                               <th>预定时间</th>
								<th>创建时间</th>
                               <th>操作</th>
                           </tr>
                           </thead>
                           <tbody>
                           {% for item in data.list %}
                               <tr>
                                   <td>
                                       <input type="checkbox" value="{{ item.id }}" class="i-checks" name="check">
                                   </td>
   									<td>{{item.orderNo}}</td>
   									<td>{{ctx.helper.show(item.orderName, 10)}}</td>
   									<td>{{item.name}}</td>
   									<td>{{item.mobile}}</td>
   									<td>{{ constant.status(item.status) }}</td>
   									<td>￥{{item.price}}</td>
   									<td>{{ constant.source(item.orderSource)}}</td>
                                   <td>
                                       {{ ctx.helper.date(item.bookingTime, 'YYYY-MM-DD') }}
                                       {{ item.arriveTime }}
                                   </td>
   									<td>{{item.createTime}}</td>
                                   <td data-id="{{ item.id }}">
                                       <a href="/order/detail?id={{item.id}}">查看</a>
                                   </td>
                               </tr>
                           {% else %}
                               	暂无数据
                           {% endfor %}
                           </tbody>
                       </table>
                   </form>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="btn-region clearfix">
                    <div class="pull-right">
                        {{ pagination.pagination(data, params, '/order') }}
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>
</div>
{% endblock %}

{#js代码#}
{% block js %}
<script>


</script>

{% endblock %}
